import request from '@/utils/request'

// 获取企业信息
export function getCompanyMsg() {
  return request({
    url: '/enterprise/get',
    method: 'GET',
  })
}
// 银行账户列表
export function bankList(params) {
  return request({
    url: '/enterprise/bank/list',
    method: 'GET',
    params,
  })
}
// 新增银行账户
export function addBank(data) {
  return request({
    url: '/enterprise/bank/add',
    method: 'POST',
    data,
  })
}
// 编辑银行账户
export function editBank(data) {
  return request({
    url: '/enterprise/bank/edit',
    method: 'PUT',
    data,
  })
}
// 验证小金额验证
export function validateComBankAcc(params) {
  return request({
    url: '/enterprise/validateComBankAcc',
    method: 'POST',
    params,
  })
}
// 银行账户详情
export function bankDetail(id) {
  return request({
    url: `/enterprise/bank/get/${id}`,
    method: 'GET',
  })
}
// 删除银行账户
export function delBank(id) {
  return request({
    url: `/enterprise/bank/delete/${id}`,
    method: 'DELETE',
  })
}
// 变更管理员获取code
export function getCode(smsType) {
  return request({
    url: '/enterprise/code',
    method: 'POST',
    headers: {
      smsType
    },
  })
}
// 变改管理员
export function changeAdmin(data) {
  return request({
    url: '/enterprise/operation/change/admin',
    method: 'DELETE',
    data
  })
}
// 修改管理员账号
export function changeAccount(data) {
  return request({
    url: '/system/user/account',
    method: 'PUT',
    data
  })
}
// 获取运营人员列表
export function operationList(params) {
  return request({
    url: '/enterprise/operation/list',
    method: 'GET',
    params,
  })
}
// 新增运营人员
export function addOperation(data) {
  return request({
    url: '/enterprise/operation/add',
    method: 'POST',
    data,
  })
}
// 删除运营人员
export function delOperation(id) {
  return request({
    url: `/enterprise/operation/${id}`,
    method: 'DELETE'
  })
}
// 查看运营人员
export function operationDetail(id) {
  return request({
    url: `/enterprise/operation/${id}`,
    method: 'GET'
  })
}
// 编辑运营人员
export function editOperation(data) {
  return request({
    url: '/enterprise/operation/edit',
    method: 'PUT',
    data,
  })
}
// 被邀企业列表
export function inviteList(params) {
  return request({
    url: '/invite/list',
    method: 'GET',
    params,
  })
}
// 邀请企业入驻平台统计
export function inviteViews() {
  return request({
    url: '/invite/view',
    method: 'GET',
  })
}
